classic_battlefield_moddingfandomcom-20200214-history
Autocontroller Tips in BF2142
Autocontrollers can be used in BF2142 to automate gun positions. For BF2142, they are only used for the automated sentry guns, recon drones and missile silos but they have a lot more uses. The autocontroller templates are located in the mods AI folder in the autocontroller.ai file. The following explanation provided by DICE shows the amount of customization that is available for Autocontrollers: An auto controller allows you to have the AI control a playerControlObject of a weapon or vehicle. This way you can create automatic weapons like the sentry gun in Battlefield 2142. Explanation of properties: operatesAlone: If this is set to 0 the AI will only be activated if a player enters another pco of the vehicle. E.g. You could have an automatic cannon on a vehicle that will activate and help the player driving the vehicle scanningSpeed: This is the speed at which the AI will scan the area for enemies. Make sure that the MaxSpeed and Acceleration of the rotational bundle is set up so that the AI isn't restricted by it. fov: Field of view of the AI in degrees viewDistance: view distance of the AI in meters useSiren: if 1 the weapon will warn before opening fire. A horn template must be added to the AltFire button reactionTime: Time between first noticing an enemy and opening fire. targetLostTimeout: time that AI will continue to look in the direction it last saw the enemy after it has lost sight of him. sendFireWarning: will add flashing icon to minimap when firing reportEnemiesToTeam: will report target enemy to team allowTakeOver: will allow player to enter position of autoController. AutoController will be activated again when player exits pco. maxTrackingInput: this is the maximum steering input allowed for the autoController while tracking an enemy. Decrease this is you want it to aim slower. checkLineOfFire: AI will not fire if a friendly soldier is in it's line of fire discoverCloakedEnemiesDistance: AI will detect enemies within this distance even if they are cloaked flipOutAtHealth: autoController will flip out when it's health goes below this value (0.1 = 10 percent of full health) scanningInputScale: input to rotational bundle will be scaled with this value when autoController isn't firing and isn't flipping out. Use this to get a smooth scanning motion while still letting the rotation bunde keep a high maximum rotational speed (this is good when flipping out) scanningSpeedWhenFlippingOut : use this scanning speed when the autoController flips out reloadOnTeamChange : used only by the missile silos to force a reload delay of the weapon after it has been captured onlyAttackNetworkBattlefieldObjects : if true, this autoController will only attack objects that are reported to it's owners squad. I.e. player who owns the autoController must be in a squad or the autoController will attack nothing. Default is false. simpleFirePlan: an autoController with this property will do nothing but just fire it's weapon all the time. This is used to make the recon drone keep firing as long as it's deployed Here are some examples of Autocontroller templates: Sentry Gun as used in BF2142 autoControllerTemplate.create SentryGun autoControllerTemplate.operatesAlone 1 autoControllerTemplate.scanningSpeed 0.1 autoControllerTemplate.fov 179 autoControllerTemplate.accuracy 1 autoControllerTemplate.viewDistance 1000 autoControllerTemplate.useSiren 1 autoControllerTemplate.reactionTime 0.1 autoControllerTemplate.targetLostTimeout 0.05 autoControllerTemplate.sendFireWarning 1 autoControllerTemplate.reportEnemiesToTeam 1 autoControllerTemplate.allowTakeOver 1 autoControllerTemplate.maxTrackingInput 1 autoControllerTemplate.checkLineOfFire 1 autoControllerTemplate.discoverCloakedEnemiesDistance 5 autoControllerTemplate.flipOutAtHealth 0.25 autoControllerTemplate.scanningInputScale 0.12 This is can be used to automated the BF2142 stationary gun positions autoControllerTemplate.create AutoStatGun autoControllerTemplate.operatesAlone 1 autoControllerTemplate.scanningSpeed 0.03 autoControllerTemplate.fov 179 autoControllerTemplate.accuracy 1 autoControllerTemplate.viewDistance 300 autoControllerTemplate.useSiren 1 autoControllerTemplate.reactionTime 0 autoControllerTemplate.targetLostTimeout 0.0001 autoControllerTemplate.sendFireWarning 1 autoControllerTemplate.reportEnemiesToTeam 1 autoControllerTemplate.allowTakeOver 1 autoControllerTemplate.maxTrackingInput 1 autoControllerTemplate.checkLineOfFire 0 autoControllerTemplate.discoverCloakedEnemiesDistance 300 rem autoControllerTemplate.flipOutAtHealth 0.25